/**
 * Created by YAN on 2017/7/11.
 */
var login = angular.module('login', [
    'ngResource'
]);
login.component('login', {
    templateUrl: 'views/login/login.template.html',
    controller: ['$routeParams', 'Phone','$scope',
        function LoginController($routeParams,Phone,$scope) {
            this.phones = Phone.query();
            $scope.$on('ngRepeatFinished', function (ngRepeatFinishedEvent) {
                var swiper = new Swiper('.swiper-container', {
                    pagination: '.swiper-pagination',
                    nextButton: '.swiper-button-next',
                    prevButton: '.swiper-button-prev',
                    paginationClickable: true,
                    mousewheelControl: true,
                    centeredSlides: true,
                    autoplay: 2000,
                    effect: "cube",
//        fade: {
//            crossFade: true
//        },
                    autoplayDisableOnInteraction: false,
                    paginationBulletRender: function (swiper, index, className) {
                        return '<span class="' + className + '">' + (index + 1) + '</span>';
                    }
                });
            });
        }

    ]
});